<template>
  <div>
    <div>
      <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
  <el-menu-item index="1"> <i class="el-icon-menu"/>黄金品类</el-menu-item>
  <el-submenu index="2">
    <template slot="title"> 
    <i class="el-icon-plus"/>
              新增打包单
      </template>
    <el-menu-item index="2-1"><router-link to="/menu/packingbygoods" tag="span">按产品打包</router-link></el-menu-item>
    <el-menu-item index="2-1"><router-link to="/menu/packingbyupstreamorder" tag="span">按上游单打包</router-link></el-menu-item>
  </el-submenu>
  <el-menu-item index="3" class="el-icon-printer">
            导出
          </el-menu-item>

        <el-col :span="6">
          <el-date-picker v-model="date"
                          @blur="searchDate"
                          type="daterange"
                          format="yyyy-MM-dd"
                          value-format="timestamp"
                          start-placeholder="开始日期"
                          end-placeholder="结束日期"
                          :default-time="['00:00:00', '23:59:59']">
          </el-date-picker>
        </el-col>
         <el-col :span="4">
          <el-input v-model="input"
                    placeholder="请输入打包单号"></el-input>
        </el-col>
        <el-col :span="2">
          <el-button type="primary"
                     @click="search"
                     icon="el-icon-search">搜索</el-button>

        </el-col>
        <el-col :span="3">
          <el-button :circle="true"
                     icon="el-icon-delete-solid"></el-button>
          <el-button :circle="true"
                     icon="el-icon-refresh"></el-button>

        </el-col>
</el-menu>

    </div>
    <!-- 选货单列表 -->
    <div>
      <el-table :data="selectorderlist"
                style="width: 100%">
        <el-table-column prop="id"
                         label="序号"
                         width="50">
        </el-table-column>
        <el-table-column prop="ordernum"
                         label="单号"
                         width="180">
        </el-table-column>
        <el-table-column prop="client"
                         label="客户">
        </el-table-column>
        <el-table-column prop="warehouse"
                         label="仓库">
        </el-table-column>
        <el-table-column prop="status"
                         label="状态">
        </el-table-column>
        <el-table-column prop="purity"
                         label="成色">
        </el-table-column>
        <el-table-column prop="weight"
                         label="重量">
        </el-table-column>
        <el-table-column prop="amount"
                         label="数量">
        </el-table-column>

        <el-table-column prop="amount"
                         label="附加工费">
        </el-table-column>

        <el-table-column prop="makingtime"
                         label="制单时间">
        </el-table-column>

        <el-table-column
            label="操作">
             <el-button :circle="true"
                     icon="el-icon-more-outline"></el-button>
        </el-table-column>
      </el-table>
    </div>
    <div>
      共多少<font v-model="datanum">{{datanum}}</font>条数据
      <div class="page">
        <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage4"
      :page-sizes="[100, 200, 300, 400]"
      :page-size="100"
      layout="total, sizes, prev, pager, next, jumper"
      :total="400">
    </el-pagination>
      </div>
    </div>

  </div>
</template>

<script>
// 导入相依组件

export default {
  components: {},

  data() {
    return {
     
      value1: '',
      input: '',
      selectorderlist: [
        {
          id: 1,
          ordernum: 11,
          client: '张三',
          warehouse: '华南仓库A',
          status: '未选购',
          purity: '千足金',
          weight: 1.3,
          amount: 20,
          makingtime: '2020年',
        },
        {
          id: 1,
          ordernum: 11,
          client: '张三',
          department: '销售部',
          status: '未选购',
          purity: '千足金',
          weight: 1.3,
          amount: 20,
          makingtime: '2020年',
        },
        {
          id: 1,
          ordernum: 11,
          client: '张三',
          department: '销售部',
          status: '未选购',
          purity: '千足金',
          weight: 1.3,
          amount: 20,
          makingtime: '2020年',
        },
      ],
      datanum: '12',
    }
  },
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`)
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
    },
    search() {
      //按输入入库编号查
      //alert(this.date);
    },
    searchDate() {
      //按时间查询
      alert(this.date)
    },
  },
}
</script>

<style scoped>
.time {
  margin-top: 10px;
  margin-left: 900px;
}
.page {
  float: right;
}
</style>
